package com.example.user_service.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author XiaoLiu
 * @date 2021-12-08 15:51
 **/
@Configuration
public class RPC
{
    @Bean
    @LoadBalanced//负载均衡注解
    public RestTemplate getRestTemplate()
    {
        return new RestTemplate();
    }
}
